package java111_2;

public class Day37 {

    public boolean solve (String A, String B) {
        // write code here
        if(A.length() != B.length()){
            return false;
        }
        for(int i = 0; i < A.length(); i++){
            String s1 = A.substring(0,i);
            String s2 = A.substring(i);
            if(B.contains(s1) && B.contains(s2)){
                return true;
            }
        }
        return false;
    }

    // 合并k个有序链表
}
